Check Metadata for HPAv18

  • class 27 : 122 sample
  • There is no Uncertain status samples in class 27
In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import cv2
import os
In [2]:
import warnings
warnings.filterwarnings("ignore")

Master

In [3]:
name_label_dict2 = {
0:  'Nucleoplasm (GO:0005654)',
1:  'Nuclear membrane (GO:0031965)',
2:  'Nucleoli (GO:0005730)',   
3:  'Nucleoli fibrillar center (GO:0001650)',
4:  'Nuclear speckles (GO:0016607)',
5:  'Nuclear bodies (GO:0016604)',
6:  'Endoplasmic reticulum (GO:0005783)',   
7:  'Golgi apparatus (GO:0005794)',
8:  'Peroxisomes (GO:0005777)',
9:  'Endosomes (GO:0005768)',
10:  'Lysosomes (GO:0005764)',
11:  'Intermediate filaments (GO:0045111)',
12:  'Actin filaments (GO:0015629)',
13:  'Focal adhesion sites (GO:0005925)',   
14:  'Microtubules (GO:0015630)',
15:  'Microtubule ends (GO:1990752)',  
16:  'Cytokinetic bridge (GO:0045171)',   
17:  'Mitotic spindle (GO:0072686)',
18:  'Microtubule organizing center (GO:0005815)',  
19:  'Centrosome (GO:0005813)',
20:  'Lipid droplets (GO:0005811)',
21:  'Plasma membrane (GO:0005886)',   
22:  'Cell Junctions (GO:0030054)', 
23:  'Mitochondria (GO:0005739)',
24:  'Aggresome (GO:0016235)',
25:  'Cytosol (GO:0005829)',
26:  'Cytoplasmic bodies (GO:0036464)',   
27:  'Rods & Rings ()',
28:  'Midbody (GO:0030496)',
29:  'Cleavage furrow (GO:0032154)',
30:  'Nucleus (GO:0005634)',
31:  'Vesicles (GO:0043231)',
32:  'Midbody ring (GO:0090543)'
}
In [4]:
GeneList = pd.read_csv("input/subcellular_location.tsv", sep='\t')
GeneList.head().T
Out[4]:
0 1 2 3 4
Gene ENSG00000000003 ENSG00000000457 ENSG00000000460 ENSG00000000938 ENSG00000000971
Gene name TSPAN6 SCYL3 C1orf112 FGR CFH
Reliability Approved Uncertain Approved Approved Approved
Enhanced NaN NaN NaN NaN NaN
Supported NaN NaN NaN NaN NaN
Approved Cytosol NaN Mitochondria Aggresome;Plasma membrane Vesicles
Uncertain NaN Microtubules;Nuclear bodies NaN NaN NaN
Single-cell variation intensity NaN NaN NaN NaN NaN
Single-cell variation spatial NaN NaN NaN NaN NaN
Cell cycle dependency NaN NaN NaN NaN NaN
GO id Cytosol (GO:0005829) Microtubules (GO:0015630);Nuclear bodies (GO:0... Mitochondria (GO:0005739) Aggresome (GO:0016235);Plasma membrane (GO:000... Vesicles (GO:0043231)

processed HPAv18 RGBY list

In [5]:
name_label_dict = {
0:  'Nucleoplasm',
1:  'Nuclear membrane',
2:  'Nucleoli',   
3:  'Nucleoli fibrillar center',
4:  'Nuclear speckles',
5:  'Nuclear bodies',
6:  'Endoplasmic reticulum',   
7:  'Golgi apparatus',
8:  'Peroxisomes',
9:  'Endosomes',
10:  'Lysosomes',
11:  'Intermediate filaments',
12:  'Actin filaments',
13:  'Focal adhesion sites',   
14:  'Microtubules',
15:  'Microtubule ends',  
16:  'Cytokinetic bridge',   
17:  'Mitotic spindle',
18:  'Microtubule organizing center',  
19:  'Centrosome',
20:  'Lipid droplets',
21:  'Plasma membrane',   
22:  'Cell junctions', 
23:  'Mitochondria',
24:  'Aggresome',
25:  'Cytosol',
26:  'Cytoplasmic bodies',   
27:  'Rods & rings' }
In [6]:
ImgList = pd.read_csv("input/HPAv18/HPAv18RGBY.csv")
ImgList["Gene"] = [ s[:15] for s in ImgList["Id"]]
ImgList.head()
Out[6]:
Id Target Gene
0 ENSG00000000003_4109_24_H11_1 25 ENSG00000000003
1 ENSG00000000003_4109_24_H11_2 25 ENSG00000000003
2 ENSG00000000003_4109_23_H11_1 25 ENSG00000000003
3 ENSG00000000003_4109_23_H11_2 25 ENSG00000000003
4 ENSG00000000003_4109_25_H11_1 25 ENSG00000000003

Join Tables

In [7]:
ImgListJ = ImgList.merge(GeneList,on=['Gene'],how='left')
In [8]:
ImgListJ.head().T
Out[8]:
0 1 2 3 4
Id ENSG00000000003_4109_24_H11_1 ENSG00000000003_4109_24_H11_2 ENSG00000000003_4109_23_H11_1 ENSG00000000003_4109_23_H11_2 ENSG00000000003_4109_25_H11_1
Target 25 25 25 25 25
Gene ENSG00000000003 ENSG00000000003 ENSG00000000003 ENSG00000000003 ENSG00000000003
Gene name TSPAN6 TSPAN6 TSPAN6 TSPAN6 TSPAN6
Reliability Approved Approved Approved Approved Approved
Enhanced NaN NaN NaN NaN NaN
Supported NaN NaN NaN NaN NaN
Approved Cytosol Cytosol Cytosol Cytosol Cytosol
Uncertain NaN NaN NaN NaN NaN
Single-cell variation intensity NaN NaN NaN NaN NaN
Single-cell variation spatial NaN NaN NaN NaN NaN
Cell cycle dependency NaN NaN NaN NaN NaN
GO id Cytosol (GO:0005829) Cytosol (GO:0005829) Cytosol (GO:0005829) Cytosol (GO:0005829) Cytosol (GO:0005829)

Check 27: 'Rods & rings'

In [9]:
ImgListJ["R&R_Target"] = [ ("27" in s.split(" ")) for s in ImgListJ["Target"]]
ImgListJ["R&R_GoId"] = [ ("Rods & Rings ()" in s.split(";")) for s in ImgListJ["GO id"]]
In [10]:
print(len(ImgListJ[ImgListJ["R&R_Target"]==True]))
print(len(ImgListJ[ImgListJ["R&R_GoId"]==True]))
print(len(ImgListJ[ImgListJ["R&R_Target"]==True][ImgListJ["R&R_GoId"]==False]))
122
122
0
In [11]:
RnRList = ImgListJ[ImgListJ["R&R_Target"]==True]
RnRList
Out[11]:
Id Target Gene Gene name Reliability Enhanced Supported Approved Uncertain Single-cell variation intensity Single-cell variation spatial Cell cycle dependency GO id R&R_Target R&R_GoId
5379 ENSG00000069966_44198_814_B10_1 19 4 27 ENSG00000069966 GNB5 Approved NaN NaN Centrosome;Nuclear speckles;Rods & Rings NaN NaN NaN NaN Centrosome (GO:0005813);Nuclear speckles (GO:0... True True
5380 ENSG00000069966_44198_814_B10_2 19 4 27 ENSG00000069966 GNB5 Approved NaN NaN Centrosome;Nuclear speckles;Rods & Rings NaN NaN NaN NaN Centrosome (GO:0005813);Nuclear speckles (GO:0... True True
5381 ENSG00000069966_44198_759_B10_2 19 4 27 ENSG00000069966 GNB5 Approved NaN NaN Centrosome;Nuclear speckles;Rods & Rings NaN NaN NaN NaN Centrosome (GO:0005813);Nuclear speckles (GO:0... True True
5382 ENSG00000069966_44198_759_B10_4 19 4 27 ENSG00000069966 GNB5 Approved NaN NaN Centrosome;Nuclear speckles;Rods & Rings NaN NaN NaN NaN Centrosome (GO:0005813);Nuclear speckles (GO:0... True True
5383 ENSG00000069966_44198_755_B10_1 19 4 27 ENSG00000069966 GNB5 Approved NaN NaN Centrosome;Nuclear speckles;Rods & Rings NaN NaN NaN NaN Centrosome (GO:0005813);Nuclear speckles (GO:0... True True
5384 ENSG00000069966_44198_755_B10_2 19 4 27 ENSG00000069966 GNB5 Approved NaN NaN Centrosome;Nuclear speckles;Rods & Rings NaN NaN NaN NaN Centrosome (GO:0005813);Nuclear speckles (GO:0... True True
14317 ENSG00000104375_7120_1727_A1_3 11 27 ENSG00000104375 STK3 Approved NaN NaN Intermediate filaments;Rods & Rings NaN NaN NaN NaN Intermediate filaments (GO:0045111);Rods & Rin... True True
14318 ENSG00000104375_7120_1727_A1_5 11 27 ENSG00000104375 STK3 Approved NaN NaN Intermediate filaments;Rods & Rings NaN NaN NaN NaN Intermediate filaments (GO:0045111);Rods & Rin... True True
14319 ENSG00000104375_7120_73_G8_1 11 27 ENSG00000104375 STK3 Approved NaN NaN Intermediate filaments;Rods & Rings NaN NaN NaN NaN Intermediate filaments (GO:0045111);Rods & Rin... True True
14320 ENSG00000104375_7120_73_G8_2 11 27 ENSG00000104375 STK3 Approved NaN NaN Intermediate filaments;Rods & Rings NaN NaN NaN NaN Intermediate filaments (GO:0045111);Rods & Rin... True True
16113 ENSG00000106348_1400_973_A2_5 25 27 ENSG00000106348 IMPDH1 Supported NaN Cytosol;Rods & Rings NaN NaN NaN NaN NaN Cytosol (GO:0005829);Rods & Rings () True True
16114 ENSG00000106348_1400_973_A2_6 25 27 ENSG00000106348 IMPDH1 Supported NaN Cytosol;Rods & Rings NaN NaN NaN NaN NaN Cytosol (GO:0005829);Rods & Rings () True True
16115 ENSG00000106348_1400_29_C2_1 25 27 ENSG00000106348 IMPDH1 Supported NaN Cytosol;Rods & Rings NaN NaN NaN NaN NaN Cytosol (GO:0005829);Rods & Rings () True True
16116 ENSG00000106348_1400_29_C2_2 25 27 ENSG00000106348 IMPDH1 Supported NaN Cytosol;Rods & Rings NaN NaN NaN NaN NaN Cytosol (GO:0005829);Rods & Rings () True True
16117 ENSG00000106348_1400_31_C2_1 25 27 ENSG00000106348 IMPDH1 Supported NaN Cytosol;Rods & Rings NaN NaN NaN NaN NaN Cytosol (GO:0005829);Rods & Rings () True True
16118 ENSG00000106348_1400_31_C2_2 25 27 ENSG00000106348 IMPDH1 Supported NaN Cytosol;Rods & Rings NaN NaN NaN NaN NaN Cytosol (GO:0005829);Rods & Rings () True True
18803 ENSG00000111339_75664_1762_G4_4 27 ENSG00000111339 ART4 Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
18804 ENSG00000111339_75664_1762_G4_5 27 ENSG00000111339 ART4 Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
18805 ENSG00000111339_75664_1751_A7_31 27 ENSG00000111339 ART4 Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
18806 ENSG00000111339_75664_1751_A7_32 27 ENSG00000111339 ART4 Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
23084 ENSG00000118420_27231_1042_C3_3 27 ENSG00000118420 UBE3D Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
23085 ENSG00000118420_27231_1042_C3_4 27 ENSG00000118420 UBE3D Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
23086 ENSG00000118420_27231_1161_C8_1 27 ENSG00000118420 UBE3D Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
23087 ENSG00000118420_27231_1161_C8_3 27 ENSG00000118420 UBE3D Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
24576 ENSG00000121417_49967_805_E9_1 23 27 ENSG00000121417 ZNF211 Approved NaN NaN Mitochondria;Rods & Rings NaN NaN NaN NaN Mitochondria (GO:0005739);Rods & Rings () True True
24577 ENSG00000121417_49967_805_E9_2 23 27 ENSG00000121417 ZNF211 Approved NaN NaN Mitochondria;Rods & Rings NaN NaN NaN NaN Mitochondria (GO:0005739);Rods & Rings () True True
24578 ENSG00000121417_49967_736_E9_1 23 27 ENSG00000121417 ZNF211 Approved NaN NaN Mitochondria;Rods & Rings NaN NaN NaN NaN Mitochondria (GO:0005739);Rods & Rings () True True
24579 ENSG00000121417_49967_736_E9_2 23 27 ENSG00000121417 ZNF211 Approved NaN NaN Mitochondria;Rods & Rings NaN NaN NaN NaN Mitochondria (GO:0005739);Rods & Rings () True True
24580 ENSG00000121417_49967_751_B8_3 23 27 ENSG00000121417 ZNF211 Approved NaN NaN Mitochondria;Rods & Rings NaN NaN NaN NaN Mitochondria (GO:0005739);Rods & Rings () True True
24581 ENSG00000121417_49967_751_B8_5 23 27 ENSG00000121417 ZNF211 Approved NaN NaN Mitochondria;Rods & Rings NaN NaN NaN NaN Mitochondria (GO:0005739);Rods & Rings () True True
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
63496 ENSG00000180900_23557_si21_E4_1 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63497 ENSG00000180900_23557_si21_E4_4 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63498 ENSG00000180900_23557_si21_E4_6 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63499 ENSG00000180900_23557_si21_E4_7 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63500 ENSG00000180900_23557_si21_E6_2 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63501 ENSG00000180900_23557_si21_E6_4 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63502 ENSG00000180900_23557_si21_E6_6 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63503 ENSG00000180900_23557_si21_E6_8 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63504 ENSG00000180900_64312_1272_F10_2 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63505 ENSG00000180900_64312_1272_F10_3 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63506 ENSG00000180900_64312_1232_B7_1 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63507 ENSG00000180900_64312_1232_B7_4 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63508 ENSG00000180900_64312_1199_B7_5 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
63509 ENSG00000180900_64312_1199_B7_6 22 0 21 27 ENSG00000180900 SCRIB Enhanced Cell Junctions;Nucleoplasm;Plasma membrane NaN Rods & Rings NaN NaN NaN NaN Cell Junctions (GO:0030054);Nucleoplasm (GO:00... True True
67992 ENSG00000188647_21248_147_C3_1 18 27 ENSG00000188647 PTAR1 Approved NaN NaN Microtubule organizing center;Rods & Rings NaN NaN NaN NaN Microtubule organizing center (GO:0005815);Rod... True True
67993 ENSG00000188647_21248_147_C3_2 18 27 ENSG00000188647 PTAR1 Approved NaN NaN Microtubule organizing center;Rods & Rings NaN NaN NaN NaN Microtubule organizing center (GO:0005815);Rod... True True
67994 ENSG00000188647_21248_148_C3_1 18 27 ENSG00000188647 PTAR1 Approved NaN NaN Microtubule organizing center;Rods & Rings NaN NaN NaN NaN Microtubule organizing center (GO:0005815);Rod... True True
67995 ENSG00000188647_21248_148_C3_2 18 27 ENSG00000188647 PTAR1 Approved NaN NaN Microtubule organizing center;Rods & Rings NaN NaN NaN NaN Microtubule organizing center (GO:0005815);Rod... True True
67996 ENSG00000188647_21248_146_C3_1 18 27 ENSG00000188647 PTAR1 Approved NaN NaN Microtubule organizing center;Rods & Rings NaN NaN NaN NaN Microtubule organizing center (GO:0005815);Rod... True True
67997 ENSG00000188647_21248_146_C3_2 18 27 ENSG00000188647 PTAR1 Approved NaN NaN Microtubule organizing center;Rods & Rings NaN NaN NaN NaN Microtubule organizing center (GO:0005815);Rod... True True
71968 ENSG00000204310_48478_1638_C8_1 6 27 ENSG00000204310 AGPAT1 Supported NaN Endoplasmic reticulum Rods & Rings NaN NaN NaN NaN Endoplasmic reticulum (GO:0005783);Rods & Ring... True True
71969 ENSG00000204310_48478_1638_C8_2 6 27 ENSG00000204310 AGPAT1 Supported NaN Endoplasmic reticulum Rods & Rings NaN NaN NaN NaN Endoplasmic reticulum (GO:0005783);Rods & Ring... True True
71970 ENSG00000204310_48478_1548_H10_2 6 27 ENSG00000204310 AGPAT1 Supported NaN Endoplasmic reticulum Rods & Rings NaN NaN NaN NaN Endoplasmic reticulum (GO:0005783);Rods & Ring... True True
71971 ENSG00000204310_48478_1548_H10_4 6 27 ENSG00000204310 AGPAT1 Supported NaN Endoplasmic reticulum Rods & Rings NaN NaN NaN NaN Endoplasmic reticulum (GO:0005783);Rods & Ring... True True
73013 ENSG00000213186_17750_113_G11_1 27 ENSG00000213186 TRIM59 Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
73014 ENSG00000213186_17750_113_G11_2 27 ENSG00000213186 TRIM59 Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
73015 ENSG00000213186_17750_161_G11_1 27 ENSG00000213186 TRIM59 Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
73016 ENSG00000213186_17750_161_G11_2 27 ENSG00000213186 TRIM59 Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
73017 ENSG00000213186_17750_112_G11_1 27 ENSG00000213186 TRIM59 Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True
73018 ENSG00000213186_17750_112_G11_2 27 ENSG00000213186 TRIM59 Approved NaN NaN Rods & Rings NaN NaN NaN NaN Rods & Rings () True True

122 rows × 15 columns

Reliability Status

In [12]:
uncertains = RnRList[RnRList["Reliability"]=="Uncertain"]
len(uncertains)
Out[12]:
0

Visualization function

code from Iafoss's kernel

In [13]:
def open_rgby(path,id): 
    colors = ['red','green','blue','yellow'] # RGBY
    flags = cv2.IMREAD_GRAYSCALE
    img = [cv2.imread(os.path.join(path, id+'_'+color+'.png'), flags).astype(np.float32)/255
           for color in colors]
    return np.stack(img, axis=-1)
In [14]:
def display_imgs(x):
    columns = 3
    bs = x.shape[0]
    rows = min((bs+2)//3,3)
    fig=plt.figure(figsize=(columns*4, rows*4))
    for i in range(rows):
        for j in range(columns):
            idx = i+j*columns
            fig.add_subplot(rows, columns, idx+1)
            plt.axis('off')
            plt.imshow((x[idx,:,:,:3]*255).astype(np.int))
    plt.show()

Compare Image with Train dataset

In [15]:
train = pd.read_csv("input/train.csv")
train["R&R"] = [ ("27" in s.split(" ")) for s in train["Target"]]
train_27 = train[train["R&R"]==True]
train_27
Out[15]:
Id Target R&R
663 05d32f36-bba3-11e8-b2b9-ac1f6b6435d0 2 0 27 True
943 082a828a-bbbb-11e8-b2ba-ac1f6b6435d0 5 0 27 True
1329 0afda11a-bba0-11e8-b2b9-ac1f6b6435d0 19 4 27 True
2968 18df69fc-bbb5-11e8-b2ba-ac1f6b6435d0 5 0 27 True
5194 2b3ce424-bba8-11e8-b2ba-ac1f6b6435d0 5 0 27 True
8169 43f6bd88-bbc5-11e8-b2bc-ac1f6b6435d0 0 27 True
13594 70b97ed2-bbac-11e8-b2ba-ac1f6b6435d0 0 27 True
15450 802998d4-bbbb-11e8-b2ba-ac1f6b6435d0 23 27 True
21453 b1131086-bb9f-11e8-b2b9-ac1f6b6435d0 23 27 True
24456 c9806c74-bbca-11e8-b2bc-ac1f6b6435d0 5 0 27 True
27677 e403806e-bbbf-11e8-b2bb-ac1f6b6435d0 27 True
In [16]:
x = []
for index,row in train_27.iterrows():
    x.append(open_rgby("input/train/",row['Id']))
x = np.array(x)
display_imgs(x) # first 9 sample
In [17]:
x = []
for index,row in RnRList.iterrows():
    x.append(open_rgby("input/HPAv18/png/",row['Id']))
x = np.array(x)
In [18]:
for i in range(0,len(RnRList)-5,9):
    display_imgs(x[i:i+9])
In [ ]: